package com.dz.action;

import com.dz.bean.student;
import com.dz.dao.studentMapper;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

@Controller
public class userAddServlet {
    @Resource
    private com.dz.dao.studentMapper studentMapper;
    @RequestMapping("/userAddServlet")
    @ResponseBody
    public String userAddServlet(student student){
        String str00 ="no";
       int i= studentMapper.insert(student);
        System.out.println(i);
        if (i>0){
            str00="ok";
        }
        return str00;



    }
}
